// ============================================================================
//
// Graph framework by Aurelien Moreau aurelien.moreau@gmail.com
// Modified by Pierre CHATEL chatelp@gmail.com
// Distributed under LGPL
// Copyright (C) Aurelien Moreau, 2008, 2009. All rights reserved
//
// ============================================================================

package com.thalesgroup.graphFramework.collections.iterator;

import java.util.Iterator;

public class UnModifiableIterator<T> implements Iterator<T> {
	protected Iterator<? extends T> src;

	public UnModifiableIterator(final Iterator<? extends T> src) {
		this.src = src;
	}

	public UnModifiableIterator(final Iterable<? extends T> src) {
		this.src = src.iterator();
	}

	public boolean hasNext() {
		return src.hasNext();
	}

	public T next() {
		return src.next();
	}

	public void remove() {
		throw new UnsupportedOperationException();
	}
}
